using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;
using System.Web;

namespace B4ALL.Exceptions
{
    public class ExceptionPolicy
    {

        public ExceptionPolicy()
        {

            

        }

        public static bool HandleException (Exception ex, String policy)
        {
            if (HttpContext.Current != null)
            {
                ex.Data.Add("URL", HttpContext.Current.Request.Url);
                if (HttpContext.Current.Request.UrlReferrer != null)
                    ex.Data.Add("REFERER", HttpContext.Current.Request.UrlReferrer);
            }

            return Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.HandleException(ex, policy);
        }

    }
}
